<Query Kind="Program" />

void Main()
{
	Adaptee adaptee = new Adaptee();
	Target targetA = new Adapter(adaptee);
	targetA.Request();
}

class Target {
	public virtual void Request(){
		Console.WriteLine("目标类请求方法");
	}
}

class Adaptee {
	public void SpecificRequest(){
		Console.WriteLine("适配类的请求方法");
	}
}

class Adapter : Target {
	private Adaptee _adaptee;
	public Adapter(Adaptee adaptee){
		this._adaptee = adaptee;
	}
	public override void Request(){
		_adaptee.SpecificRequest();
	}
}